package com.wkk.dataSource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

public class DynamicDataSource extends AbstractRoutingDataSource {

	@Override
	protected Object determineCurrentLookupKey() {
		System.out.println("数据源为{}" + JdbcContextHolder.getDataSource());
		return JdbcContextHolder.getDataSource();
	}
}
